<%@page import="java.util.ArrayList"%>
<%@ page language="java" contentType="text/html; charset=UTF-8"
    pageEncoding="UTF-8"%>
<%@ taglib uri="http://java.sun.com/jsp/jstl/core" prefix="c" %> 
<!DOCTYPE html>
<html>
<head>
<meta http-equiv="Content-Type" content="text/html; charset=UTF-8">
<title>Insert title here</title>
</head>
<body>
<h1>JSTL CORE 라이브러리 실습</h1>
<%
	int [] num = {1,2,3,4,5,6,7,8,9,10};
	request.setAttribute("myArray", num);
%>
for(int i=0;i<6;i++)
<c:forEach var="n" items="${myArray }" begin="0" end="6" step="1">
	<c:out value="${n }"/>
</c:forEach>
<%
 	ArrayList<String> list = new ArrayList<String>();
	list.add("홍길동");
	list.add("이순신");
	list.add("유관순");
	request.setAttribute("name", list);
%>
<c:forEach var="n" items="${name }">
	<c:out value="${n }"/>
</c:forEach>
<br>
<%
	String str = "A,B,C,D";
	request.setAttribute("data", str);
%>
<c:forTokens items="${data }" delims="," var="n">
	<c:out value="${n }"/><br>
</c:forTokens>
</body>
</html>